function edge_function=get_edge(stru_grid)
fedge=fopen('edge.txt','r');
entry=fgetl(fedge);
fclose(fedge);
if entry(1)=='N'||entry(1)=='n'
    edge=sscanf(entry(5:length(entry)),'%d');
else
    edge=sscanf(entry,'%d');
end

edge=int32(edge);
edge_line=[];
for i=1:length(edge)
    edge_line(end+1,:)=stru_grid(stru_grid(:,1)==edge(i),2:3);
end
edge_line(end+1,:)=[edge_line(1,1),-100];
[edge_function,~]=fit(edge_line(:,2),-edge_line(:,1),'linearinterp','Normalize','on' );
end